﻿using DongFangGuoKai.WMSPlatform.Commn.ApiResultModule;
using DongFangGuoKai.WMSPlatform.Domain.AGVModels;
using DongFangGuoKai.WMSPlatform.Domain.Models;
using DongFangGuoKai.WMSPlatform.Service.User.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongFangGuoKai.WMSPlatform.Service.User
{
    public interface IUserService
    {
        /// <summary>
        /// 判断登录
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        LoginRes GetLogin(LoginDto m);

        /// <summary>
        /// 用户选择颜色
        /// </summary>
        /// <param name="selectColorDTO"></param>
        /// <returns></returns>
        SelectColorDTO? SelectColor(SelectColorDTO selectColorDTO,out string errMsg);

        bool RemoveColor(SelectColorDTO selectColorDTO, out string errMsg);

        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddUser(UserRoleDTO m,out string errMsg);

        /// <summary>
        /// 用户显示
        /// </summary>
        /// <param name="uname">用户名</param>
        /// <param name="rid">角色</param>
        /// <param name="state">状态</param>
        /// <returns></returns>
        List<t_User> GetUserList(string? uname, int rid, int state, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        bool DelUser(int uid,out string errMsg);

        /// <summary>
        /// 根据主键获取用户信息
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        UserRoleDTO? URById(int uid);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdUser(UserRoleDTO m, out string errMsg);
    }
}
